<!DOCTYPE html>
<html>
	<head>
		<title>订单提交 - {:config('web.WEB_TIT')}</title>
		{include file="member/public"}
	</head>
	<body class=" bgcolor">
		<header data-am-widget="header" class="am-header am-header-default jz">
		      <div class="am-header-left am-header-nav">
		         <a href="javascript:history.back()" class="">
					<i class="am-icon-chevron-left"></i>
				</a>
		      </div>
		      <h1 class="am-header-title">
		          <a href="#title-link" class="">添加订单</a>
		      </h1>
        </header>
       <div class="jl"></div>
       <div class="addcard">
       	  <div class="addcard-kh">
       	  	<span>订单号</span>
			  <input type="text" name="order_sn" id="order_sn" placeholder="请输入订单号"/>
			  <input type="hidden" name="__token__" id="token" value="{$Request.token}" />
       	  </div>
       </div>
	    <button class="login-btn" id="submit" type="button">提交</button>
		<script type="text/javascript">
            $('#submit').click(function(){
                var order_sn = $('#order_sn').val();
                if(order_sn == ''){
                    alert('请输入订单号');
                    return false;
                }
                $.ajax({
                    type: 'POST',
                    url: "{:url('member/ordersub')}",
                    data:{order_sn:order_sn,token:$('#token').val()},
                    dataType:'json',
                    success: function(data){
                        if(data.code == 200){
                            alert(data.msg)
                            window.location.href = "{:url('member/index')}";
                        }else{
                            alert(data.msg)
                            location.reload(true);
                        }
                    },
                });
            });
		</script>
	</body>
</html>
